package org.example.springboot;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController  // 因为要传数据，所以用该注解
@RequestMapping("/calc")
public class SumCalcController {
    @RequestMapping("/sum")
    public String sum(Integer num1, Integer num2) {
        return "两数之和为：" + (num1+num2);
    }
}
